<!doctype html>
<html lang="zh-CN" th:replace="admin-layout :: layout(~{::title}, ~{}, ~{::script}, ~{::body}, 'user-list')"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <title>修改密码</title>
    <script>
        $("#submitBtn").click(function(){
            var password = $("#pwd").val();
            if (!password) {
                msgAlert("请输入密码")
                return;
            }
            $("#password").val(hex_md5(password + KEY));
            ajaxJson("/admin/user/ajax/update/pwd",$("#form").serialize(),function(res){
                if(res.status){
                    location.href="/admin/user/list";
                }
            })
        })
    </script>
</head>
<body>
<ol class="breadcrumb">
    <li><a th:href="@{/admin/user/list}">用户列表</a></li>
    <li class="active">修改密码</li>
</ol>
<form class="form-horizontal" id="form">
    <input type="hidden" name="id" th:if="${id}" th:value="${id}">
    <input type="hidden" name="password" id="password">
    <div class="form-group">
        <label class="col-sm-2 col-md-2 col-lg-3 control-label"><span class="text-danger">*&nbsp;</span>密码</label>
        <div class="col-sm-8 col-md-8 col-lg-6">
            <input type="text" class="form-control" placeholder="密码" id="pwd">
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-2 col-md-offset-2 col-lg-offset-3 col-sm-8 col-md-8 col-lg-6">
            <button type="button" class="btn btn-primary" id="submitBtn">提交</button>
            <button type="button" class="btn btn-warning backBtn">返回</button>
        </div>
    </div>
</form>
</body>
</html>